The invention relates generally to communication systems. More specifically, the invention relates to synchronizing transmission and reception of data over a network independent of a network synchronizing timing signal.
Typical communication networks, including telecommunication networks, include devices that require timing information to enable them to transmit and receive data at an appropriate times. For example, an audio coder-decoder (CODEC) is a device used in telecommunication systems for converting an uncompressed analog signal from for example, a microphone, to a compressed digital signal for transmission over a communication network. CODECs also enable reception of compressed digital signals by converting the compressed digital signals back to an analog signal and outputting the analog signal, to for example, a speaker. Video and multimedia CODECs perform similar functions over multimedia networks.
Traditionally, CODECs transmit data over communication networks in such a way as to maintain a defined relationship in time between the transmitted digital signals. Similarly, CODECs also receive data in such a way to maintain a defined relationship in time between the received digital signals while processing those signals.
In one example of the operation of an audio CODEC, a microphone provides an analog signal to an analog-to-digital (A/D) converter in the CODEC. A digital portion of the CODEC takes pulse code modulated (PCM) digital audio samples from the A/D converter, compresses those samples, and transmits them over the communication network. The digital portion of the CODEC also takes compressed PCM digital samples from the communication network, uncompresses those samples and feeds them to a digital-to-analog (D/A) converter.
Typically, the communication network is of a fixed, known bit-rate and provides a timing signal or clock at the bit-rate frequency which is used by the CODEC to maintain a defined time relationship between the transmitted samples and also between the received samples during processing. To avoid overflow and underflow of the transmitted data and thus distortion, traditional CODECs use the timing signal from the communication network to lock the rate at which the digital portion of the CODEC takes the PCM samples from the A/D converter with the rate at which the digital portion of the CODEC provides the compressed samples to the communication network. Similarly, the CODEC also uses the timing signal from the communication network to lock the rate at which the digital portion of the CODEC receives samples from the communication network with the rate at which the digital portion of the CODEC delivers samples to the D/A converter.
Using a communication network timing signal to regulate time relationships between samples transmitted over the communication network and between samples received from the communication network enjoys widespread usage in the networking community where a reliable network timing signal is always available. However, reliable network timing signals may not always be available. Thus, in one aspect, the invention addresses the situation in which a reliable network timing signal is not readily available.
The invention is generally directed to methods and systems for converting analog signals to digital samples for transmission over a communication network, and for converting digital samples received over a communication network to analog signals. According to a feature of the invention, such conversions may be performed independent of a reliable network synchronizing timing signal.
According to one embodiment, the invention provides a coder-decoder (CODEC). In one aspect, the CODEC includes an analog-to-digital converter, a digital-to-analog converter, an encoding local oscillator, a decoding local oscillator, an encoding master clock generator, a decoding master clock generator, a modem or a digital network access device, and a controller. The modem enables the CODEC to connect to an analog communication network. Alternatively, a digital network access device could be used to enable the CODEC to connect to a digital communication network. The digital-to-analog converter converts digital samples received over the communication network by way of the modem to an analog signal. The analog-to-digital converter converts an analog signal to digital samples for transmission over the communication network by way of the modem.
According to one feature, the encoding master clock generator generates an encoding master clock signal from the encoding local oscillator, and a decoding master clock generator generates a decoding master clock signal from the decoding local oscillator. In one embodiment, the encoding master clock signal controls the sampling rate for the analog-to-digital converter, and the decoding master clock signal controls the conversion rate for the digital-to-analog converter. According to a further feature, the frequencies of the decoding and encoding master clock signals are at least in part dependent on a connect rate between the modem and the communication network.
According to one embodiment, the encoding master clock generator frequency divides a clock signal from the encoding local oscillator to obtain a phase comparator reference signal. The encoding master clock generator determines an initial divide ratio for performing the frequency divide based at least in part on a connect rate between the modem and the communication network. The encoding master clock generator then phase locks the comparator reference signal to generate the encoding master clock signal with a substantially constant initial frequency. According to another feature, the controller provides encoding buffer information to the encoding master clock generator, and the encoding master clock generator adjusts the encoding master clock frequency in dependence on the encoding buffer information from the controller.
According to another embodiment, the decoding master clock generator frequency divides a clock signal from the decoding local oscillator to obtain a phase comparator reference signal. The decoding master clock generator determines an initial divide ratio for performing the frequency divide based at least in part on a connect rate between the modem and the communication network. The decoding master clock generator then phase locks the comparator reference signal to generate the decoding master clock signal with a substantially constant initial frequency. According to another feature, the controller provides decoding buffer information to the decoding master clock generator, and the decoding master clock generator adjusts the decoding master clock frequency in dependence on the decoding buffer information from the controller.
The controller controls, among other things, the transfer of digital samples between the analog-to-digital and digital-to-analog converters and the modem. According to one feature, the controller provides an encoding buffer and a decoding buffer. The encoding buffer intermediately stores digital samples being transferred from the analog-to-digital converter to the modem. The decoding buffer intermediately stores digital signals being transferred from the modem to the digital-to-analog converter. The buffers enable the controller to maintain a defined time relationship between each of the digital samples during transfer between the converters and the modem. In the case of an acoustic CODEC, maintaining such a defined relationship reduces distortion in audio signals being processed by the CODEC. According to another feature each buffer has an associated fill pointer and an associated empty pointer. The fill pointer points to a location in the buffer where the next digital sample is to be stored. The empty pointer points to the buffer location storing the next digital sample to be transferred. In one embodiment, the controller maintains the defined time relationship between digital samples by monitoring a distance between the fill and empty pointers.
In the case of the encoding buffer, in response to the controller detecting that the distance between the fill and empty pointers are less than a predefined closeness threshold, the controller decreases the sampling rate of the analog-to-digital converter. In response to detecting that the distance between the fill and empty pointers are greater than a predefined separation threshold, the controller increases the sampling rate of the analog-to-digital converter.
In the case of the decoding buffer, in response to the controller detecting that the distance between the fill and empty pointers are less than a predefined closeness threshold, the controller increases the conversion rate of the digital to analog converter. In response to the controller detecting that the distance between the fill and empty pointers is greater than a predefined separation threshold, the controller decreases the conversion rate of the digital-to-analog converter.
In another embodiment, the controller alters the sampling rate of the analog-to-digital converter by changing the frequency of the encoding master clock signal. Similarly, the controller alters the conversion rate of the digital-to-analog converter by changing the frequency of the decoding master clock signal.
According to another feature, the controller applies well known data compression algorithms to digital samples coming from the analog-to-digital converter, and well known data decompression algorithms to data coming from the modem or the digital network access device.